package org.tacademy.service;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MyServiceActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        final Intent intent = new Intent(this,NewsService.class);
     //   final Intent intent = new Intent("org.tacademy.NEWS");
        Button start = (Button)findViewById(R.id.start);
        start.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				startService(intent);
			}
		});
        
        Button stop = (Button)findViewById(R.id.stop);
        stop.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				stopService(intent);
			}
		});
    }
   
    
  
    
    
}